﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace StyleMVVM.Validation
{
	public interface IRuleExecutionContext<T>
	{
		ValidationState State { get; set; }

		string Message { get; set; }

		T ValidationObject { get; }

		void AddValidationPart(IValidationRuleResultPart part);

		void AddRequired(string partName, string message);

		void AddError(string partName, string message);

		void AddWarning(string partName, string message);

		void AddRequired<TProp>(Expression<Func<T, TProp>> partName, string message);

		void AddError<TProp>(Expression<Func<T, TProp>> partName, string message);

		void AddWarning<TProp>(Expression<Func<T, TProp>> partName, string message);
	}
}